<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title>write</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link href="js/emoji.css" rel="stylesheet" type="text/css" />
        <script src="js/emoji.js" type="text/javascript"></script>
        <script type="text/javascript">

            function insertHtmlAtCursor(html) {
                var range, node;
                var hasSelection = window.getSelection;
                var selection = window.getSelection();
                if (hasSelection && selection.rangeCount > 0 && selection.getRangeAt) {
                    range = window.getSelection().getRangeAt(0);
                    node = range.createContextualFragment(html);
                    range.
                    range.insertNode(node);
                } else if (document.selection && document.selection.createRange) {
                    document.selection.createRange().pasteHTML(html);
                } else {
                    var element = document.createElement('div');
                    element.innerHTML = html;
                    node = element.childNodes[0];
                    document.body.appendChild(node);
                }
            }
            insertHtmlAtCursor('hhh');

        </script>
    </head>
    <body contenteditable="true" style="word-wrap:break-word;font-family:TimesRoman;font-size:12px;margin-top:0;color:#000000;">
        <input onclick="insertHtmlAtCursor('hhh');" type="button" value="in"/>
    </body>
</html>
